<?php
class gTpl {
	public static $path;
	public static function icon($type) {
		return "<span class='ui-icon ui-icon-$type'></span>";
	}
	public static function button($type, $label, $href='', $onclick='') {
		if($href) $href = "href='$href'";
		if($onclick) $onclick = "onclick='$onclick'";
		if(preg_match('/^[a-zA-Z0-9_\-\s]+$/',$label)) $label = L($label);
		return "<a $href $onclick class='jqbutton' _icon='$type'>$label</a>";
	}
	public static function highlight($label, $type='info') {
		return "<span class='ui-state-highlight tip'><span class='ui-icon ui-icon-$type'></span>$label</span>";
	}
};
gTpl::$path = WEB_PUBLIC_PATH."/default/cupertino/";
?>